package com.yu.weixinsms.Model;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class TemperatureDto {


    @JsonProperty("message")
    private String message;
    @JsonProperty("status")
    private Integer status;
    @JsonProperty("date")
    private String date;
    @JsonProperty("time")
    private String time;
    @JsonProperty("cityInfo")
    private CityInfoDTO cityInfo;
    @JsonProperty("data")
    private DataDTO data;

    @NoArgsConstructor
    @Data
    public static class CityInfoDTO {
        @JsonProperty("city")
        private String city;
        @JsonProperty("citykey")
        private String citykey;
        @JsonProperty("parent")
        private String parent;
        @JsonProperty("updateTime")
        private String updateTime;
    }

    @NoArgsConstructor
    @Data
    public static class DataDTO {
        @JsonProperty("shidu")
        private String shidu;
        @JsonProperty("pm25")
        private Double pm25;
        @JsonProperty("pm10")
        private Double pm10;
        @JsonProperty("quality")
        private String quality;
        @JsonProperty("wendu")
        private String wendu;
        @JsonProperty("ganmao")
        private String ganmao;
        @JsonProperty("forecast")
        private List<ForecastDTO> forecast;
        @JsonProperty("yesterday")
        private YesterdayDTO yesterday;

        @NoArgsConstructor
        @Data
        public static class YesterdayDTO {
            @JsonProperty("date")
            private String date;
            @JsonProperty("high")
            private String high;
            @JsonProperty("low")
            private String low;
            @JsonProperty("ymd")
            private String ymd;
            @JsonProperty("week")
            private String week;
            @JsonProperty("sunrise")
            private String sunrise;
            @JsonProperty("sunset")
            private String sunset;
            @JsonProperty("aqi")
            private Integer aqi;
            @JsonProperty("fx")
            private String fx;
            @JsonProperty("fl")
            private String fl;
            @JsonProperty("type")
            private String type;
            @JsonProperty("notice")
            private String notice;
        }

        @NoArgsConstructor
        @Data
        public static class ForecastDTO {
            @JsonProperty("date")
            private String date;
            @JsonProperty("high")
            private String high;
            @JsonProperty("low")
            private String low;
            @JsonProperty("ymd")
            private String ymd;
            @JsonProperty("week")
            private String week;
            @JsonProperty("sunrise")
            private String sunrise;
            @JsonProperty("sunset")
            private String sunset;
            @JsonProperty("aqi")
            private Integer aqi;
            @JsonProperty("fx")
            private String fx;
            @JsonProperty("fl")
            private String fl;
            @JsonProperty("type")
            private String type;
            @JsonProperty("notice")
            private String notice;
        }
    }
}
